<?php switch ($type) {
	case 'D':
		?>
		<ul class="list-album" id="photo">
			 <?php foreach($model as $data):?>
				   <li>
				       <a class="thumb-album" rel="view-photo-<?php echo $data->album_id;?>" href="<?php echo Yii::app()->request->baseUrl.'/'.ORIGIN_IMAGE;?>Member/originimage/<?php echo $data->image;?>"><img src="<?php echo Yii::app()->request->baseUrl.'/'.ORIGIN_IMAGE;?>Member/173_150/<?php echo $data->image;?>" alt="<?php echo $data->image;?>"/></a>
				   </li>
			 <?php endforeach;?>
		</ul>
		<?php
		break;
	
	case 'C':
		?>
		<ul class="list-album" id="photo">
			 <?php foreach($model as $data):?>
				   <li>
				       <a class="thumb-album" rel="view-photo-<?php echo $data->member_id;?>" href="<?php echo Yii::app()->request->baseUrl.'/'.ORIGIN_IMAGE;?>Banner/originimage/<?php echo $data->image;?>"><img src="<?php echo Yii::app()->request->baseUrl.'/'.ORIGIN_IMAGE;?>Banner/173_150/<?php echo $data->image;?>" alt="<?php echo $data->image;?>"/></a>
				   </li>
			 <?php endforeach;?>
		</ul>
		<?php
		break;

	case 'A':
		?>
		<ul class="list-album" id="photo">
			 <?php foreach($model as $data):?>
				   <li>
				       <a class="thumb-album" rel="view-photo-<?php echo $data->member_id;?>" href="<?php echo Yii::app()->request->baseUrl.'/'.ORIGIN_IMAGE;?>Avatar/originimage/<?php echo $data->image;?>" ><img src="<?php echo Yii::app()->request->baseUrl.'/'.ORIGIN_IMAGE;?>Avatar/173_150/<?php echo $data->image;?>" alt="<?php echo $data->image;?>"/></a>
				   </li>
			 <?php endforeach;?>
		</ul>
		<?php
		break;

	case 'M'
		?>
		<ul class="list-album" id="photo">
			 <?php foreach($model as $data):?>
				   <li>
				       <a class="thumb-album" rel="view-photo-<?php echo $data->album_id;?>" href="<?php echo Yii::app()->request->baseUrl.'/'.ORIGIN_IMAGE;?>Member/originimage/<?php echo $data->image;?>"><img src="<?php echo Yii::app()->request->baseUrl.'/'.ORIGIN_IMAGE;?>Member/173_150/<?php echo $data->image;?>" alt="<?php echo $data->image;?>"/></a>
				   </li>
			 <?php endforeach;?>
		</ul>
		<?php
		break;
} ?>
<input type="hidden" name="readmore" id="readmore" value="1">
<input type="hidden" name="album_id" id="album_id" value="<?php echo $album_id;?>">
<p style="text-align: center;"><a href="javascript: void(0);" onClick="readmorePhoto();" class="read-more">Xem thêm</a><img src="<?php echo Yii::app()->theme->baseUrl;?>/images/loader.gif" class="loadding-read-more"></p>
<script type="text/javascript">
$(document).ready(function() {
	$(".thumb-album").fancybox({
		openEffect	: 'none',
		closeEffect	: 'none'
	});
});
function readmorePhoto(){
	$.ajax({
		url: '<?php echo Yii::app()->createUrl("/Users/default/readmorePhoto");?>',
		data: {id: $('#readmore').val(), username: <?php echo $_GET['username'];?>, type: <?php echo $type;?>, album_id: $('#album_id').val()},
		type: 'post',
		beforeSend: function(){
			$('.read-more').attr('style','display: none');
			$('.loadding-read-more').attr('style','display: block');
		},
		success: function (data){
			$(data).appendTo('#photo');
			$('.read-more').attr('style','display: block');
			$('.loadding-read-more').attr('style','display: none');
		}
	});		
}
</script>